import axios from 'axios'
export function login(data) {
  return axios.post('/api/admin/login/username', data)
}
export function phoneLogin(data) {
  return axios.post('/api/admin/login/phone', data)
}
export function logout() {
  return axios.post('/api/admin/logout')
}
export function getUserInfo() {
  return axios.get('/api/admin/info')
}
export function register(data) {
  return axios.post('/api/admin/register', data)
}
export function resetPassword(data) {
  return axios.post('/api/admin/password/reset', data)
}
export const uploadUserAvatarUrl = `${process.env.BASE_API}/api/admin/upload/avatar`